#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@Project ：turbo 
@File    ：model.py
@Author  ：赵加响
@Date    ：2023/5/22 17:43 
@Desc    ：accounts模块不可用该基类
"""
from django.contrib.auth import get_user_model
from django.db import models

User = get_user_model()


class APIModel(models.Model):
    created = models.ForeignKey(User, verbose_name='新建用户ID', related_name='+',
                                on_delete=models.DO_NOTHING, blank=True, null=True)
    created_date = models.DateTimeField(verbose_name='新建时间', blank=True, null=True)
    created_program = models.CharField(verbose_name='新建程序', max_length=255, blank=True, null=True)
    updated = models.ForeignKey(User, verbose_name='更新用户ID', related_name='+',
                                on_delete=models.DO_NOTHING, blank=True, null=True)
    updated_date = models.DateTimeField(verbose_name='更新时间', blank=True, null=True)
    updated_program = models.CharField(verbose_name='更新程序', max_length=255, blank=True, null=True)

    class Meta:
        abstract = True
